<%# locals: (category:) -%>
<%= form_with model: category, url: category.persisted? ? update_category_path : categories_path, method: :post do |f| %>
  <div class="labelled_grid">
    <%= f.label :category, 'Name', class: 'required' %>
    <%= f.text_field :category  %>
  </div>

  <%= f.submit category.persisted? ? 'Update Category' : 'Create Category' %>
<% end %>
